<?php
include"config.php";

$id = $_GET['id'];

$kueri = mysql_query("select * from tbl_heuristik where id_heuristik = '$id'");
while($data = mysql_fetch_array($kueri)){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="assets/jquery/jquery-1.6.2.min.js"></script>
<script src="assets/jquery/jquery-ui-1.8.15.custom.min.js"></script>
<link rel="stylesheet" href="assets/jquery/jqueryCalendar.css">
<script>
jQuery(function() {
	jQuery( "#date" ).datepicker();
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PB Heuristik</title>
</head>

<body>
<form action="proses_edit_heuristik.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
  <table width="500" border="1" align="center" cellpadding="1" cellspacing="1">
    <tr>
      <td colspan="3" align="center">Edit Heuristik</td>
    </tr>
    <tr>
      <td>Code</td>
      <td>:</td>
      <td><textarea name="code" cols="30" rows="5" id="code"><?=$data['code'];?>
      </textarea></td>
    </tr>
    <tr>
      <td>Detail</td>
      <td>:</td>
      <td><textarea name="detail" cols="30" rows="5" id="detail"><?=$data['detail'];?>
      </textarea></td>
    </tr>
    <tr>
      <td>Status</td>
      <td>:</td>
      <td><select name="status" id="status">
        <option value="banned" <?php if($data['status'] == 'banned'){ echo"selected=\"selected\" "; } ?>>Banned</option>
        <option value="unbanned" <?php if($data['status'] == 'unbanned'){ echo"selected=\"selected\" "; } ?>>Unbanned</option>
      </select>
      <input name="id" type="hidden" id="id" value="<?=$id;?>" /></td>
    </tr>
    <tr>
      <td>Date</td>
      <td>:</td>
      <td><label>
        <input name="date" type="text" id="date" value="<?=$data['date'];?>" />
      format : YYYY-MM-DD </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="submit" name="button" id="button" value="Submit" /></td>
    </tr>
  </table>
</form>
</body>
</html>
<?php
}
?>